home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 2 / Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso / Pearls / dev / TurboM2 / m2 / FastStorage.def < prev    next >
Text File  |  1995-01-23  |  692b  |  17 lines

  1. DEFINITION MODULE FastStorage ;
  2.  
  3. FROM SYSTEM IMPORT ADDRESS ;
  4.  
  5. PROCEDURE ALLOCATE( VAR p : ADDRESS ; size : LONGINT ) ;
  6. (* Like Storage.ALLOCATE but much faster.                 *)
  7. (* Allocates memory in blocks of 16K. And chops them up as required.     *)
  8. (* This avoids calling the OS every time you need 16bytes of memory etc. *)
  9. (* If you ask for more than 16K in one go, then this will be allocated   *)
  10. (* as normal.                                     *)
  11. (* The disadvantage is that all the allocated memory can only be freed   *)
  12. (* at program exit                                 *)
  13. (* DO NOT TRY TO FREE ANY MEMORY ALLOCATED USING THIS PROCEDURE !!     *)
  14. (* It will be freed for you when the program terminates.         *)
  15.  
  16. END FastStorage.
  17.